import axios from '@/util/request.ts'

export function uploadFile(data) {
  return axios.post('mini/ApiConnect/upload', data)
}

/**
 * @param {Function} onUploadProgress 进度条回调
 * */
export function pythonUploadFile(data, onUploadProgress) {
  return axios.post(
    'upload',
    data,
    {
      meta: {
        isPython: true
      },
      onUploadProgress
    },
  )
}